package com.baozhun.mall.common.widget.customview.filter

import android.content.Context
import android.view.LayoutInflater
import android.view.View
import android.widget.TextView
import com.baozhun.mall.common.R
import com.baozhun.mall.common.model.bean.FilterOptionItem
import com.zhy.view.flowlayout.FlowLayout
import com.zhy.view.flowlayout.TagAdapter

/**
 * @Title：
 * @Description：
 * @Author：xing.luo
 * @Since：2022/11/12
 * @Version：1.0.0
 */
class GenderFilterAdapter(val data: List<FilterOptionItem>, val context: Context): TagAdapter<FilterOptionItem>(data) {

    override fun getView(parent: FlowLayout?, position: Int, t: FilterOptionItem?): View {
        var textView = LayoutInflater.from(context).inflate(R.layout.view_filter_tag_gender, null) as TextView
        textView.text = t?.name
        return textView
    }
}